package com.tong.ft_home.ui;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;

import androidx.annotation.NonNull;

import com.tong.ft_home.databinding.FragmentHomeBinding;
import com.tong.lib_base.base.AbcFragmentVM;
import com.tong.lib_base.ft_login.service.impl.LoginImpl;

import org.jetbrains.annotations.NotNull;

/**
 * author:liuzhitong
 * date:2022/3/2
 * description:
 */
public class FragmentHome extends AbcFragmentVM {

    private FragmentHomeBinding mbinding;

    @Override
    public void initData() {

    }

    @Override
    public void initViews(View view) {
    }

    @Override
    public View initBinding(@NonNull @NotNull LayoutInflater inflater) {
//        viewModel = new ViewModelProvider(this).get(ViewModelFragHome.class);
        mbinding = FragmentHomeBinding.inflate(inflater);
        mbinding.setLifecycleOwner(getActivity());
        mbinding.setFragment(this);
//        mbinding.setViewModel(viewModel);
        return mbinding.getRoot();
    }
    public void check(){
        mbinding.text.setText("计算结果是1+2="+LoginImpl.getInstance().calculate(1,2));
    }
}
